<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Divisores do parametro</title>

<%
	Integer numero = Integer.valueOf(request.getParameter("numero"));
	List<Integer> dividores = new ArrayList<Integer>();
	StringBuilder tableHtml= new StringBuilder();
	tableHtml.append("<table border='1'>");
	tableHtml.append("<tr><th><b>Divisor</b></th></tr>");
	for(int i=2;i<=numero/2;i++)
		if(numero%i == 0){
			tableHtml.append("<tr>");
			tableHtml.append("<td>").append(i).append("</td>");
			tableHtml.append("</tr>");
		}
	tableHtml.append("</table>");

%>
</head>
<body>
	<h1>Divisores de <%=numero %></h1>
	
	<%=tableHtml.toString() %>

</body>
</html>